package top.wardyan.wbaseswt.control;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Composite;

import top.wardyan.wbaseswt.conf.Const;

public class WCombo extends CCombo{

	public WCombo(Composite parent, int style) {
		super(parent, style);
		this.createContent();
	}
	
	public WCombo(Composite parent, int x, int y, int width, int height, Font font) {
		this(parent, SWT.BORDER);
		this.setBounds(x, y, width, height);
	}
	
	
	
	private void createContent() {
		this.setFont(Const.getDefaultFont());
	}
	
	/**
	 * 取得控件右下角的定点的x
	 * @return
	 */
	public int getVertexX() {
		return this.getLocation().x + this.getSize().x;
	}
	/**
	 * 取得控件右下角的定点的y
	 * @return
	 */
	public int getVertexY() {
		return this.getLocation().y + this.getSize().y;
	}

	@Override
	protected void checkSubclass() {}

}

